package com.itheima.网络编程.tcp编程.tcp编程.tcp网络编程;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

public class TcpCilentDemo1 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        Socket sk = new Socket("127.0.0.1", 10000);
        while (true) {
            OutputStream outputStream = sk.getOutputStream();
            System.out.println("请输入数据:");
            outputStream.write(sc.next().getBytes());
        }
    }
}
